package com.xms.file.service;

import com.xms.core.data.Entity;
import com.xms.core.exception.XmsException;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.Part;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import java.util.UUID;

/**
 * <p>
 * IAttachmentCreater
 * </p>
 *
 * @author migo
 * @since 2021/9/14
 */
public interface IAttachmentCreaterService {
    Entity create(UUID entityId, UUID objectId, Part file) throws XmsException, SQLException, IOException;
    Entity create(UUID entityId, UUID objectId, MultipartFile file) throws XmsException, SQLException, IOException;
    List<Entity> createMany(UUID entityId, UUID objectId, List<MultipartFile> files) throws XmsException, IOException;
}
